Skip to content

Winch: Float conversion instructions#7773

Merged
saulecabrera merged 2 commits into
bytecodealliance:mainfrom
jeffcharles:winch-float-conversion-instructions
Jan 12, 2024
Merged

Winch: Float conversion instructions#7773
saulecabrera merged 2 commits into
bytecodealliance:mainfrom
jeffcharles:winch-float-conversion-instructions

Conversation

@jeffcharles
Copy link
Copy Markdown
Contributor

Part of #6528. Adds support for the following instructions to Winch:

  • i32.trunc_f32_s
  • i32.trunc_f32_u
  • i32.trunc_f64_s
  • i32.trunc_f64_u
  • i64.trunc_f32_s
  • i64.trunc_f32_u
  • i64.trunc_f64_s
  • i64.trunc_f64_u
  • i32.reinterpret_f32
  • i64.reinterpret_f64
  • f32.convert_i32_s
  • f32.convert_i32_u
  • f32.convert_i64_s
  • f32.convert_i64_u
  • f64.convert_i32_s
  • f64.convert_i32_u
  • f64.convert_i64_s
  • f64.convert_i64_u
  • f32.reinterpret_i32
  • f64.reinterpret_i64
  • f32.demote_f64
  • f64.promote_f32

@jeffcharles jeffcharles requested review from a team as code owners January 12, 2024 15:19
@jeffcharles jeffcharles requested review from fitzgen and removed request for a team January 12, 2024 15:19
Copy link
Copy Markdown
Member

@saulecabrera saulecabrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@saulecabrera saulecabrera added this pull request to the merge queue Jan 12, 2024
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 12, 2024
@jeffcharles
Copy link
Copy Markdown
Contributor Author

Not sure why https://github.com/bytecodealliance/wasmtime/actions/runs/7504830983/job/20432782059 failed. Running cargo test --target=x86_64-apple-darwin -- wast::Winch --nocapture locally shows everything as passing.

@saulecabrera
Copy link
Copy Markdown
Member

It's because the conversion spec tests assert for traps https://github.com/bytecodealliance/wasmtime/pull/7773/files#diff-823efed0acf795e9245a551aadae26695321f840cbe4b51b12410b26bde35c45R70 and currently since Winch doesn't fully encode unwind information, any tests that trap will fail on Windows. You need to add the conversion suites that trap here https://github.com/bytecodealliance/wasmtime/blob/main/build.rs#L210

@jeffcharles jeffcharles requested a review from a team as a code owner January 12, 2024 19:03
@saulecabrera saulecabrera added this pull request to the merge queue Jan 12, 2024
Merged via the queue into bytecodealliance:main with commit b546a5f Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants